package com.bsoft.gol.hcs.specialist.dao;

import ctd.persistence.annotation.DAOMethod;
import ctd.persistence.annotation.DAOParam;
import ctd.persistence.support.hibernate.HibernateSupportDelegateDAO;
import com.bsoft.gol.hcs.specialist.entity.FollowPlanEntity;

import java.util.List;

/**
 * @author hekr22831
 * @description 患者院后随访设置计划
 * @date 2022/5/26.8:52
 */
public abstract class FollowPlanDAO extends HibernateSupportDelegateDAO<FollowPlanEntity> {
    public FollowPlanDAO() {
        this.setKeyField("followPlanId");
    }

    /**
     * 查询院后随访设置计划
     * @param fusPathRouteId 院后随访id
     * @return
     */
    @DAOMethod(sql = "from FollowPlan where fusPathRouteId=:fusPathRouteId ")
    public abstract List<FollowPlanEntity> findFplByFusPathRouteId(@DAOParam("fusPathRouteId") long fusPathRouteId);

    /**
     * 删除院后随访设置计划
     * @param fusPathRouteId
     */
    @DAOMethod(sql = "delete from FollowPlan where fusPathRouteId=:fusPathRouteId")
    public abstract void deleteFollowPlanById(@DAOParam("fusPathRouteId") long fusPathRouteId);
}
